Integrand size = 23, antiderivative size = 255 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {\cot (e+f x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}} \]
cot(f*x+e)*EllipticE((a+b*sec(f*x+e))^(1/2)/(a+b)^(1/2),((a+b)/(a-b))^(1/2 ))*(b*(1-sec(f*x+e))/(a+b))^(1/2)*(-b*(1+sec(f*x+e))/(a-b))^(1/2)/f/(a+b)^ (1/2)-cot(f*x+e)*EllipticF((a+b*sec(f*x+e))^(1/2)/(a+b)^(1/2),((a+b)/(a-b) )^(1/2))*(b*(1-sec(f*x+e))/(a+b))^(1/2)*(-b*(1+sec(f*x+e))/(a-b))^(1/2)/f/ (a+b)^(1/2)-cot(f*x+e)/f/(a+b*sec(f*x+e))^(1/2)+b^2*tan(f*x+e)/(a^2-b^2)/f /(a+b*sec(f*x+e))^(1/2)
Time = 7.39 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.02 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {\sqrt {\sec (e+f x)} \left (\frac {(b+a \cos (e+f x)) (-a+b \cos (e+f x)) \csc (e+f x)}{\left (a^2-b^2\right ) \sqrt {\sec (e+f x)}}+\frac {b \left (-\frac {(a+b) \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \left (E\left (\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a-b}{a+b}\right )-\operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {a-b}{a+b}\right )\right )}{\sqrt {\frac {\cos (e+f x)}{1+\cos (e+f x)}}}-(b+a \cos (e+f x)) \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\left (-a^2+b^2\right ) \sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )} \sqrt {\cos ^2\left (\frac {1}{2} (e+f x)\right ) \sec (e+f x)}}\right )}{f \sqrt {a+b \sec (e+f x)}} \]
(Sqrt[Sec[e + f*x]]*(((b + a*Cos[e + f*x])*(-a + b*Cos[e + f*x])*Csc[e + f *x])/((a^2 - b^2)*Sqrt[Sec[e + f*x]]) + (b*(-(((a + b)*Sqrt[(b + a*Cos[e + f*x])/((a + b)*(1 + Cos[e + f*x]))]*(EllipticE[ArcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)] - EllipticF[ArcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)]))/ Sqrt[Cos[e + f*x]/(1 + Cos[e + f*x])]) - (b + a*Cos[e + f*x])*Tan[(e + f*x )/2]))/((-a^2 + b^2)*Sqrt[Sec[(e + f*x)/2]^2]*Sqrt[Cos[(e + f*x)/2]^2*Sec[ e + f*x]])))/(f*Sqrt[a + b*Sec[e + f*x]])
Time = 0.96 (sec) , antiderivative size = 290, normalized size of antiderivative = 1.14, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.478, Rules used = {3042, 4363, 25, 3042, 4320, 27, 3042, 4316, 3042, 4319, 4492}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cos \left (e+f x-\frac {\pi }{2}\right )^2 \sqrt {a-b \csc \left (e+f x-\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4363 |
\(\displaystyle \frac {1}{2} b \int -\frac {\sec (e+f x)}{(a+b \sec (e+f x))^{3/2}}dx-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {1}{2} b \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^{3/2}}dx-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{2} b \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\left (a+b \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{3/2}}dx-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 4320 |
\(\displaystyle -\frac {1}{2} b \left (-\frac {2 \int -\frac {1}{2} \sec (e+f x) \sqrt {a+b \sec (e+f x)}dx}{a^2-b^2}-\frac {2 b \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}\right )-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {1}{2} b \left (\frac {\int \sec (e+f x) \sqrt {a+b \sec (e+f x)}dx}{a^2-b^2}-\frac {2 b \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}\right )-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{2} b \left (\frac {\int \csc \left (e+f x+\frac {\pi }{2}\right ) \sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {2 b \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}\right )-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 4316 |
\(\displaystyle -\frac {1}{2} b \left (\frac {(a-b) \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)}}dx+b \int \frac {\sec (e+f x) (\sec (e+f x)+1)}{\sqrt {a+b \sec (e+f x)}}dx}{a^2-b^2}-\frac {2 b \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}\right )-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{2} b \left (\frac {(a-b) \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )}}dx+b \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (\csc \left (e+f x+\frac {\pi }{2}\right )+1\right )}{\sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )}}dx}{a^2-b^2}-\frac {2 b \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}\right )-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 4319 |
\(\displaystyle -\frac {1}{2} b \left (\frac {b \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (\csc \left (e+f x+\frac {\pi }{2}\right )+1\right )}{\sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )}}dx+\frac {2 (a-b) \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{b f}}{a^2-b^2}-\frac {2 b \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}\right )-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
\(\Big \downarrow \) 4492 |
\(\displaystyle -\frac {1}{2} b \left (\frac {\frac {2 (a-b) \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{b f}-\frac {2 (a-b) \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b f}}{a^2-b^2}-\frac {2 b \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}\right )-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}\) |
-(Cot[e + f*x]/(f*Sqrt[a + b*Sec[e + f*x]])) - (b*(((-2*(a - b)*Sqrt[a + b ]*Cot[e + f*x]*EllipticE[ArcSin[Sqrt[a + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e + f*x]))/(a - b))])/(b*f) + (2*(a - b)*Sqrt[a + b]*Cot[e + f*x]*EllipticF[Ar cSin[Sqrt[a + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e + f*x]))/(a - b))])/(b*f))/(a ^2 - b^2) - (2*b*Tan[e + f*x])/((a^2 - b^2)*f*Sqrt[a + b*Sec[e + f*x]])))/ 2
3.3.54.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[csc[(e_.) + (f_.)*(x_)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_S ymbol] :> Simp[(a - b) Int[Csc[e + f*x]/Sqrt[a + b*Csc[e + f*x]], x], x] + Simp[b Int[Csc[e + f*x]*((1 + Csc[e + f*x])/Sqrt[a + b*Csc[e + f*x]]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_S ymbol] :> Simp[-2*(Rt[a + b, 2]/(b*f*Cot[e + f*x]))*Sqrt[(b*(1 - Csc[e + f* x]))/(a + b)]*Sqrt[(-b)*((1 + Csc[e + f*x])/(a - b))]*EllipticF[ArcSin[Sqrt [a + b*Csc[e + f*x]]/Rt[a + b, 2]], (a + b)/(a - b)], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_ Symbol] :> Simp[(-b)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(f*(m + 1)* (a^2 - b^2))), x] + Simp[1/((m + 1)*(a^2 - b^2)) Int[Csc[e + f*x]*(a + b* Csc[e + f*x])^(m + 1)*(a*(m + 1) - b*(m + 2)*Csc[e + f*x]), x], x] /; FreeQ [{a, b, e, f}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)/cos[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[Tan[e + f*x]*((a + b*Csc[e + f*x])^m/f), x] + Simp[b*m Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, m}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/Sqrt[c sc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*(A*b - a*B)*Rt[a + b*(B/A), 2]*Sqrt[b*((1 - Csc[e + f*x])/(a + b))]*(Sqrt[(-b)*((1 + Csc[e + f*x])/(a - b))]/(b^2*f*Cot[e + f*x]))*EllipticE[ArcSin[Sqrt[a + b*Csc[e + f*x]]/Rt[a + b*(B/A), 2]], (a*A + b*B)/(a*A - b*B)], x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[a^2 - b^2, 0] && EqQ[A^2 - B^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(758\) vs. \(2(233)=466\).
Time = 5.73 (sec) , antiderivative size = 759, normalized size of antiderivative = 2.98
method | result | size |
default | \(-\frac {\sqrt {a +b \sec \left (f x +e \right )}\, \left (-\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, a b \cos \left (f x +e \right )-\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, b^{2} \cos \left (f x +e \right )+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) a b \cos \left (f x +e \right )+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) b^{2} \cos \left (f x +e \right )-\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, a b -\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, b^{2}+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, a b +\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, b^{2}+a^{2} \cos \left (f x +e \right ) \cot \left (f x +e \right )-a b \cos \left (f x +e \right ) \cot \left (f x +e \right )+a b \cot \left (f x +e \right )-b^{2} \cot \left (f x +e \right )\right )}{f \left (a -b \right ) \left (a +b \right ) \left (b +a \cos \left (f x +e \right )\right )}\) | \(759\) |
-1/f/(a-b)/(a+b)*(a+b*sec(f*x+e))^(1/2)/(b+a*cos(f*x+e))*(-EllipticF(cot(f *x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*(1/(a+b)*(b+a*cos(f*x+e))/(cos(f*x+e )+1))^(1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*a*b*cos(f*x+e)-EllipticF(cot (f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*(1/(a+b)*(b+a*cos(f*x+e))/(cos(f*x +e)+1))^(1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*b^2*cos(f*x+e)+(1/(a+b)*(b +a*cos(f*x+e))/(cos(f*x+e)+1))^(1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*Ell ipticE(cot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*a*b*cos(f*x+e)+(1/(a+b)* (b+a*cos(f*x+e))/(cos(f*x+e)+1))^(1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*E llipticE(cot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*b^2*cos(f*x+e)-(1/(a+b )*(b+a*cos(f*x+e))/(cos(f*x+e)+1))^(1/2)*EllipticF(cot(f*x+e)-csc(f*x+e),( (a-b)/(a+b))^(1/2))*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*a*b-(1/(a+b)*(b+a*co s(f*x+e))/(cos(f*x+e)+1))^(1/2)*EllipticF(cot(f*x+e)-csc(f*x+e),((a-b)/(a+ b))^(1/2))*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*b^2+(1/(a+b)*(b+a*cos(f*x+e)) /(cos(f*x+e)+1))^(1/2)*EllipticE(cot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2) )*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*a*b+(1/(a+b)*(b+a*cos(f*x+e))/(cos(f*x +e)+1))^(1/2)*EllipticE(cot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*(cos(f* x+e)/(cos(f*x+e)+1))^(1/2)*b^2+a^2*cos(f*x+e)*cot(f*x+e)-a*b*cos(f*x+e)*co t(f*x+e)+a*b*cot(f*x+e)-b^2*cot(f*x+e))
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int \frac {\csc ^{2}{\left (e + f x \right )}}{\sqrt {a + b \sec {\left (e + f x \right )}}}\, dx \]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
Timed out. \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int \frac {1}{{\sin \left (e+f\,x\right )}^2\,\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}} \,d x \]